#!/usr/bin/env coffee

route = {}

_dump = (dict, prefix="")->
    for path, mod of dict.default
        if typeof(mod) == "string"
            if prefix
                mod = prefix + "/" + mod
            console.log(
                """'#{mod}':import('./vue/#{mod}.vue'),"""
            )
        else
            _dump(
                mod
                (if prefix then prefix+"/" else '')+ (path or require('./config/site'))
            )

console.log 'module.exports = {'
_dump require('./route')
console.log '}'

